<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>密码修改</title>
<link rel="stylesheet" type="text/css"
	href="<?=base_url()?>public/css/style.css">
<script type="text/javascript"
	src="<?=base_url()?>public/js/jq.1.12.4.js"></script>
<script type="text/javascript" src="<?=base_url()?>public/js/js.js"></script>
<style type="text/css">
.btn {
    background-color: #254e01;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    width: 40%;
    margin-left: 29%;
    height: 35px;
    text-align: center;
    line-height: 32px;
    color: white;
    margin-top: 15px;
    font-size: 18px;
    border-radius: 13px;
}
.logoimg {
    width: 229px;
    height: 62px;
    border-radius: 13px;
    background-color: #f7fee3;
}
</style>
</head>
<body>
	<!-- 头部 -->
	<?php echo $menu?>
	<!-- 主体 -->
	<div class="main clearfix">
		<?php echo $left?>
		<div class="content">
			<div class="con">
				<div class="bikuang">
					<div class="right_title">
						<span>操作后台&nbsp;&nbsp; -<span style="color: #1d3e00; margin: 0;">&nbsp;&nbsp;密码修改</span></span>
					</div>

					<div
						style="border-bottom: 1px dotted #c2c5ba; padding-bottom: 20px;">
						<div class="person">
							<?php echo form_open_multipart('admin/pwd/update_pwd',array('id'=>'myform')); ?>
							<p>
								<span>旧密码：</span><input type="password" name="oldpwd" id="oldpwd" value="">
							</p>
							<p>
								<span>新密码：</span><input type="password" name="pwd" id="pwd" value="">
							</p>
							<p>
								<span>确认密码：</span><input type="password" name="rpwd" id="rpwd" value="">
							</p>
							<input id="tijiao" type="button" value="提交" class="btn">
							</form>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>
	</div>

	<script type="text/javascript">
$(function(){

  $('#tijiao').on('click', function(event) {
    
    if($('#oldpwd').val() == ''){
      alert('请输入旧密码');
      return false;
    }
    if($('#pwd').val() == ''){
      alert('请输入新密码');
      return false;
    }
    if($('#rpwd').val() != $('#pwd').val()){
      alert('两次输入的新密码不同');
      return false;
    }
    if($('#pwd').val() == $('#oldpwd').val()){
      alert('新密码不能与旧密码相同');
      return false;
    }
	$('#myform').submit();
    
  });
})
</script>

</body>
</html>